document.write('<link rel="stylesheet" type="text/css" href="../css/common/header.css">');
var header = '<div class="top">\
                <div class="headerTabbar">\
                  <ul id="nav" ican="row" ican-bottom="item_5" ican-cur="">\
                    <li ican="true" href="../index/index.html" id="header_li_1">推荐</li>\
                    <li ican="true" href="../arena/arena.html" id="header_li_2">梨园擂台</li>\
                    <li ican="true" href="../famous_part/famous-part.html" id="header_li_3">名家名段</li>\
                    <li ican="true" href="../class/classDetail.html" id="header_li_4">分类</li>\
                    <li ican="true" href="../my/Record.html" id="header_li_5">我的</li>\
                    <li ican="true" href="../search/Search.html" id="header_li_6">搜索</li>\
                  </ul>\
                </div>\
                <div class="funcDiv">\
                  <div class="top-time">11:33&nbsp|</div>\
                  <div class="top-right">\
                  <div>2018-05-30 星期三</div>\
                  <div>24-30°C <img src="../image/common/weather.png"> 多云</div>\
                  </div>\
                </div>\
              </div>';
              
document.getElementById('header').innerHTML = header;
debugger
var lis = document.getElementsByTagName('li');
addClass(lis[curPageIdx % 100],'header_selected_li');
addClass(lis[curPageIdx % 100],'header_only_foucused_li');

initNav()

function initNav () {
  var el = document.getElementById('nav')
  // debugger
  if (curPageIdx === 1) {
    el.setAttribute('ican-bottom', 'arena-left')
    el.setAttribute('ican-cur', 1)
  } else if (curPageIdx === 2) {
    el.setAttribute('ican-bottom', 'tagItem0')
    el.setAttribute('ican-cur', 2)
  } else if (curPageIdx === 3) {
    el.setAttribute('ican-bottom', 'tagItem0')
    el.setAttribute('ican-cur', 3)
  } else if (curPageIdx === 4) {
    el.setAttribute('ican-bottom', 'obs')
    el.setAttribute('ican-cur', 4)
  } else if (curPageIdx === 102) {
    el.setAttribute('ican-bottom', 'buy')
    el.setAttribute('ican-cur', 2)
  } else if (curPageIdx === 202) {
    el.setAttribute('ican-bottom', 'btnItem')
    el.setAttribute('ican-cur', 2)
  }
}
